import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { BaseService } from 'src/modules/base.service';
import { Repository } from 'typeorm';
import {
  CreateBillingManagementDto,
  UpdateBillingManagementDto,
} from './billingManagement.dto';
import { BillingManagement } from './billingManagement.entity';
@Injectable()
export class BillingManagementService extends BaseService {
  module: Repository<BillingManagement>;
  constructor(
    @InjectRepository(BillingManagement)
    private rolesRepository: Repository<BillingManagement>,
  ) {
    super();
    this.module = this.rolesRepository;
  }

  async create(data: CreateBillingManagementDto): Promise<any> {
    return await this.rolesRepository.save(data);
  }

  async update(data: UpdateBillingManagementDto): Promise<any> {
    return this.rolesRepository.save(data);
  }
}
